import java.io.*;
import java.util.Hashtable;

public class q {

	public static final q b[] = new q[0];
	public static final q c = new q();
	public static final q d = new l("");
	public static final q e = new q();
	public static final q f = new q();

	public static final q b(boolean flag) {
		if (flag)
			return f;
		else
			return e;
	}

	public static final q c(int k) {
		return new by(k);
	}

	public static final q a(long l1) {
		return new by(l1);
	}

	public static final q c(String s) {
		if (s == null)
			return c;
		else
			return new l(s);
	}

	public static final q a(byte abyte0[]) {
		if (abyte0 == null)
			return c;
		else
			return new l(abyte0);
	}

	public static final q h() {
		return new l(new q[0]);
	}

	public static final q a(q aq[]) {
		return new l(aq);
	}

	public static final q a(cc cc1) {
		int k;
		q aq[] = new q[k = cc1.a];
		for (int i1 = k - 1; i1 >= 0; i1--)
			aq[i1] = (q) cc1.a(i1);

		return new l(aq);
	}

	public static final q a(String s, q q1) {
		return b(c(s), q1);
	}

	public static final q a(String s, String s1) {
		return b(c(s), c(s1));
	}

	public static final q b(q q1, q q2) {
		if (q1 == null || q2 == null)
			return c;
		else
			return new a(q1, q2);
	}

	public q() {
	}

	public int a() {
		return this != e && this != f ? 0 : 1;
	}

	public final boolean i() {
		return this == c;
	}

	public boolean c() {
		return false;
	}

	public boolean d() {
		return this == f;
	}

	public int e() {
		return 0;
	}

	public long f() {
		return 0L;
	}

	public String toString() {
		if (this == f)
			return "true";
		if (this == e)
			return "false";
		else
			return "";
	}

	public byte[] g() {
		return null;
	}

	public int b() {
		return 0;
	}

	public int a(String s) {
		return -1;
	}

	public int a(q q1) {
		return -1;
	}

	public q b(String s) {
		return c;
	}

	public q b(q q1) {
		return c;
	}

	public q a(int k) {
		return c;
	}

	public q c(q q1) {
		return this;
	}

	public final q b(String s, String s1) {
		c(new a(c(s), c(s1)));
		return this;
	}

	public void a(q q1, q q2) {
	}

	public void a(int k, q q1) {
	}

	public q d(q q1) {
		return null;
	}

	public q b(int k) {
		return null;
	}

	public int hashCode() {
		if (this == f)
			return 17;
		return this != e ? 31 : 11;
	}

	public boolean equals(Object obj) {
		return this == obj;
	}

	public q a(boolean flag) {
		return this;
	}

	public final e j() {
		e e1 = new e();
		try {
			a(e1.c(), new Hashtable());
		} catch (IOException ex) {
		}
		return e1;
	}

	public final void a(DataOutput dataoutput) throws IOException {
		a(dataoutput, new Hashtable());
	}

	public void a(DataOutput dataoutput, Hashtable hashtable)
			throws IOException {
		if (this == c) {
			dataoutput.writeByte(110);
		} else if (this == e) {
			dataoutput.writeByte(102);
		} else if (this == f) {
			dataoutput.writeByte(116);
		}
	}

	public static final q a(DataInput datainput) throws IOException {
		return a(datainput, new cc());
	}

	public static final q a(DataInput datainput, cc cc1) throws IOException {
		int k;
		int i1;
		int iq3;
		switch (k = datainput.readUnsignedByte()) {
		case -1:
			throw new EOFException();

		case 41: // ')'
			if ((i1 = datainput.readUnsignedByte()) == -1)
				throw new EOFException();
			else
				return (q) cc1.a(i1);

		case 93: // ']'
			if ((i1 = datainput.readUnsignedShort()) == -1)
				throw new EOFException();
			else
				return (q) cc1.a(i1);

		case 125: // '}'
			if ((i1 = datainput.readInt()) == -1)
				throw new EOFException();
			else
				return (q) cc1.a(i1);

		case 110: // 'n'
			return c;

		case 116: // 't'
			return f;

		case 102: // 'f'
			return e;

		case 98: // 'b'
			return c(datainput.readByte());

		case 99: // 'c'
			return c(datainput.readShort());

		case 105: // 'i'
			return c(datainput.readInt());

		case 106: // 'j'
			return a(datainput.readLong());

		case 100: // 'd'
			return a(datainput.readLong());

		case 122: // 'z'
			return d;

		case 115: // 's'
			q q1 = c(c.a(datainput));
			cc1.e(q1);
			return q1;

		case 83: // 'S'
			q q2 = c(c.b(datainput));
			cc1.e(q2);
			return q2;

		case 67: // 'C'
			q q3 = c(c.c(datainput));
			cc1.e(q3);
			return q3;

		case 112: // 'p'
			return new a(a(datainput, cc1), a(datainput, cc1));

		case 79: // 'O'
			return new l(b);

		case 40: // '('
			q aq[] = new q[iq3 = datainput.readUnsignedByte()];
			for (int j1 = 0; j1 < iq3; j1++)
				aq[j1] = a(datainput, cc1);

			return new l(aq);

		case 91: // '['
			q aq1[] = new q[iq3 = datainput.readUnsignedShort()];
			for (int k1 = 0; k1 < iq3; k1++)
				aq1[k1] = a(datainput, cc1);

			return new l(aq1);

		case 123: // '{'
			if ((iq3 = datainput.readInt()) < 0)
				throw new EOFException();
			q aq2[] = new q[iq3];
			for (int l1 = 0; l1 < iq3; l1++)
				aq2[l1] = a(datainput, cc1);

			return new l(aq2);

		case 66: // 'B'
			if ((iq3 = datainput.readInt()) < 0) {
				throw new EOFException();
			} else {
				byte abyte0[] = new byte[iq3];
				datainput.readFully(abyte0);
				return new l(abyte0);
			}
		}
		if (k >= 128)
			return c(k - 192);
		else
			throw new IOException("Corrupted serialization");
	}

	public static boolean a(DataOutput dataoutput, Hashtable hashtable, String s)
			throws IOException {
		Integer integer;
		if ((integer = (Integer) hashtable.get(s)) == null) {
			hashtable.put(s, new Integer(hashtable.size()));
			return false;
		}
		int k;
		if ((k = integer.intValue()) <= 255) {
			dataoutput.writeByte(41);
			dataoutput.writeByte(k);
		} else if (k <= 65535) {
			dataoutput.writeByte(93);
			dataoutput.writeShort(k);
		} else {
			dataoutput.writeByte(125);
			dataoutput.writeInt(k);
		}
		return true;
	}

	static {
		new by(0L);
		new by(1L);
		new by(2L);
		new by(3L);
	}
}